<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>根据精灵图拼出pink</title>
    <style>
        span {
            display: inline-block;
            /* 将行内元素转化为行内块元素 */
            /* 可以直接将background：url() no-repeat写在这里，减少代码量 */
        }

        .p {
            width: 100px;
            height: 112px;
            background: url(images/abcd.jpg) no-repeat -493px -276px;

        }

        .i {
            width: 60px;
            height: 108px;
            background: url(images/abcd.jpg) no-repeat -327px -142px;
        }

        .n {
            width: 108px;
            height: 109px;
            background: url(images/abcd.jpg) no-repeat -215px -141px;
        }

        .k {
            width: 105px;
            height: 114px;
            background: url(images/abcd.jpg) no-repeat -495px -142px;
        }
    </style>
</head>

<body>
    <span class="p"></span>
    <span class="i"></span>
    <span class="n"></span>
    <span class="k"></span>
</body>

</html>